package com.core.image.core.box;

import com.core.image.core.ReceivePacket;

import java.io.ByteArrayOutputStream;

/**
 * describe:
 *
 * @author 库琦
 * @date 2020/01/24
 */
public class StringRecevicePacket extends AbsByteArrayReceivePacket<String> {

    public StringRecevicePacket(long len) {
        super(len);
    }

    @Override
    public String buildEntity(ByteArrayOutputStream stream) {
        return new String(stream.toByteArray());
    }

    @Override
    public byte type() {
        return TYPE_MEMORY_STRING;
    }
}
